import request from '@/config/axios'

// 租户套餐 VO
export interface TenantPackageVO {
  id: number // 套餐编号
  name: string // 套餐名
  menuIds: string // 菜单权限
  remark: string // 备注
  status: number // 状态
}


// 租户套餐 API
export const TenantPackageApi = {
  // 获取租户套餐简要信息列表
  getTenantPackageSimpleList: async () => {
    return await request.get({ url: '/system/tenant-package/simple-list' })
  },

  // 获取租户套餐分页
  getTenantPackagePage: async (params: PageParam) => {
    return await request.get({ url: `/system/tenant-package/page`, params })
  },

  // 获取租户套餐详情
  getTenantPackage: async (id: number) => {
    return await request.get({ url: `/system/tenant-package/get`, params: { id } })
  },

  // 新增租户套餐
  createTenantPackage: async (data: TenantPackageVO) => {
    return await request.post({ url: `/system/tenant-package/create`, data })
  },

  // 修改租户套餐
  updateTenantPackage: async (data: TenantPackageVO) => {
    return await request.post({ url: `/system/tenant-package/update`, data })
  },

  // 删除租户套餐
  deleteTenantPackage: async (id: number) => {
    return await request.delete({ url: `/system/tenant-package/delete`, params: { id } })
  },

  // 导出租户套餐 Excel
  exportTenantPackage: async (params) => {
    return await request.download({ url: `/system/tenant-package/export-excel`, params })
  }
}
